



class Animal {
    static aa = 1;
    constructor(name, age) {
        this.name = name; 
        this.age = age;  
    }
    getInfo() {
        return `${this.name} 今年 ${this.age} 岁。`;
    }
    static getCategory() {
        return "生物类";
    }
} 

const a1 = new Animal("Tom", 2);
a1.getInfo();
console.log(a1.getInfo());
console.log(Animal.aa)
console.log(Animal.getCategory());
const a2 = new Animal("Jerry", 1);
console.log(a2.getInfo());